package com.clj.fastble.data;

/**
 * BleMsg
 */
public class BleMsg {
    /**
     * Scan
     */
    public static final int MSG_SCAN_DEVICE = 0X00;

    // Connect
    /**
     * MSG_CONNECT_FAIL
     */
    public static final int MSG_CONNECT_FAIL = 0x01;
    /**
     * MSG_DISCONNECTED
     */
    public static final int MSG_DISCONNECTED = 0x02;
    /**
     * MSG_RECONNECT
     */
    public static final int MSG_RECONNECT = 0x03;
    /**
     * MSG_DISCOVER_SERVICES
     */
    public static final int MSG_DISCOVER_SERVICES = 0x04;
    /**
     * MSG_DISCOVER_FAIL
     */
    public static final int MSG_DISCOVER_FAIL = 0x05;
    /**
     * MSG_DISCOVER_SUCCESS
     */
    public static final int MSG_DISCOVER_SUCCESS = 0x06;
    /**
     * MSG_CONNECT_OVER_TIME
     */
    public static final int MSG_CONNECT_OVER_TIME = 0x07;

    // Notify
    /**
     * PROPERTY_NOTIFY
     */
    public static final int PROPERTY_NOTIFY = 0x10;
    /**
     * MSG_CHA_NOTIFY_START
     */
    public static final int MSG_CHA_NOTIFY_START = 0x11;
    /**
     * MSG_CHA_NOTIFY_RESULT
     */
    public static final int MSG_CHA_NOTIFY_RESULT = 0x12;
    /**
     * MSG_CHA_NOTIFY_DATA_CHANGE
     */
    public static final int MSG_CHA_NOTIFY_DATA_CHANGE = 0x13;
    /**
     * KEY_NOTIFY_BUNDLE_STATUS
     */
    public static final String KEY_NOTIFY_BUNDLE_STATUS = "notify_status";
    /**
     * KEY_NOTIFY_BUNDLE_VALUE
     */
    public static final String KEY_NOTIFY_BUNDLE_VALUE = "notify_value";

    // Indicate
    /**
     * MSG_CHA_INDICATE_START
     */
    public static final int MSG_CHA_INDICATE_START = 0x21;
    /**
     * MSG_CHA_INDICATE_RESULT
     */
    public static final int MSG_CHA_INDICATE_RESULT = 0x22;
    /**
     * MSG_CHA_INDICATE_DATA_CHANGE
     */
    public static final int MSG_CHA_INDICATE_DATA_CHANGE = 0x23;
    /**
     * KEY_INDICATE_BUNDLE_STATUS
     */
    public static final String KEY_INDICATE_BUNDLE_STATUS = "indicate_status";
    /**
     * KEY_INDICATE_BUNDLE_VALUE
     */
    public static final String KEY_INDICATE_BUNDLE_VALUE = "indicate_value";

    // Write
    /**
     * MSG_CHA_WRITE_START
     */
    public static final int MSG_CHA_WRITE_START = 0x31;
    /**
     * MSG_CHA_WRITE_RESULT
     */
    public static final int MSG_CHA_WRITE_RESULT = 0x32;
    /**
     * MSG_SPLIT_WRITE_NEXT
     */
    public static final int MSG_SPLIT_WRITE_NEXT = 0x33;
    /**
     * KEY_WRITE_BUNDLE_STATUS
     */
    public static final String KEY_WRITE_BUNDLE_STATUS = "write_status";
    /**
     * KEY_WRITE_BUNDLE_VALUE
     */
    public static final String KEY_WRITE_BUNDLE_VALUE = "write_value";

    // Read
    /**
     * MSG_CHA_READ_START
     */
    public static final int MSG_CHA_READ_START = 0x41;
    /**
     * MSG_CHA_READ_RESULT
     */
    public static final int MSG_CHA_READ_RESULT = 0x42;
    /**
     * KEY_READ_BUNDLE_STATUS
     */
    public static final String KEY_READ_BUNDLE_STATUS = "read_status";
    /**
     * KEY_READ_BUNDLE_VALUE
     */
    public static final String KEY_READ_BUNDLE_VALUE = "read_value";

    // Rssi
    /**
     * MSG_READ_RSSI_START
     */
    public static final int MSG_READ_RSSI_START = 0x51;
    /**
     * MSG_READ_RSSI_RESULT
     */
    public static final int MSG_READ_RSSI_RESULT = 0x52;
    /**
     * KEY_READ_RSSI_BUNDLE_STATUS
     */
    public static final String KEY_READ_RSSI_BUNDLE_STATUS = "rssi_status";
    /**
     * KEY_READ_RSSI_BUNDLE_VALUE
     */
    public static final String KEY_READ_RSSI_BUNDLE_VALUE = "rssi_value";

    // Mtu
    /**
     * MSG_SET_MTU_START
     */
    public static final int MSG_SET_MTU_START = 0x61;
    /**
     * MSG_SET_MTU_RESULT
     */
    public static final int MSG_SET_MTU_RESULT = 0x62;
    /**
     * KEY_SET_MTU_BUNDLE_STATUS
     */
    public static final String KEY_SET_MTU_BUNDLE_STATUS = "mtu_status";
    /**
     * KEY_SET_MTU_BUNDLE_VALUE
     */
    public static final String KEY_SET_MTU_BUNDLE_VALUE = "mtu_value";

    /**
     * Value used to enable notification for a client configuration descriptor
     */
    public static final byte[] ENABLE_NOTIFICATION_VALUE = {0x01, 0x00};

    /**
     * Value used to disable notifications or indicatinos
     */
    public static final byte[] DISABLE_NOTIFICATION_VALUE = {0x00, 0x00};
    /**
     * Value used to enable indication for a client configuration descriptor
     */
    public static final byte[] ENABLE_INDICATION_VALUE = {0x02, 0x00};
}
